#include "image.h"

int main() {

  int i = 0;

  image a;
  cout << "initial matrix:" << endl;
  a.print(a.initial,a.size[0],a.size[1]);

  a.transpose = a.computetranspose(a.initial,a.size[0],a.size[1]);
  cout << "tranpose:" << endl;
  a.print(a.transpose,a.size[1],a.size[0]);
  a.hermetian = a.multiply(a.transpose,a.initial,a.size[1],a.size[0],a.size[0],a.size[1]);
  cout << "hermetian:" << endl;
  a.print(a.hermetian,a.size[1],a.size[1]);
  a.createRandomBasis(a.size[1]);
  cout << "random basis is:" << endl;
  a.print(a.randomBasis,a.size[1],a.size[1]);
  a.randomBasis = a.gramSchmidt(a.randomBasis,a.size[1], a.size[1]);
  cout << "gram scmidt of random basis:" << endl;
  a.print(a.randomBasis,a.size[1],a.size[1]);

  cout << "the eigenmatrix is:" << endl;
  i = a.computeEigenmatrix(a.hermetian,a.size[1]);
  cout << "the size is: " << i << endl;

  if(!a.eigenvectors.empty()) {
    cout << "the eigenvectors are: " << endl;
    a.print(a.eigenvectors,i,a.size[1]);
  }

  cout << "the eigenvalues are: " << endl;
  for(int j=0;j<i;j++) {
    cout << a.eigenvalues[j] << endl;
  }

  a.computeSingularValues();
  cout << "the singular values are: " << endl;
  for(int j=0;j<i;j++) {
    cout << a.singularvalues[j] << endl;
  }
  
  a.computeEigenrange();
  a.computeSVD();

}
